package com.xxgc.eow.mapper;

import com.xxgc.eow.entity.CollectCommentSecondary;
import com.xxgc.eow.entity.Collectcomment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xxgc.eow.entity.Likecomment;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 收藏评论表 Mapper 接口
 * </p>
 *
 * @author Mr.Abel
 * @since 2023-05-24
 */
@Mapper
public interface CollectcommentMapper extends BaseMapper<Collectcomment> {

    List<Collectcomment> selectAllByUserId(Integer userId);

    int insertLikeComment(CollectCommentSecondary collectCommentSecondary);

    Integer getLikeNumByCommentId(int commentId);

    int updateCommentLike(@Param("commentId") int commentId, @Param("collectNum") int collectNum);

    int delLikeComment(CollectCommentSecondary collectCommentSecondary);

    CollectCommentSecondary selectDataTf(CollectCommentSecondary collectCommentSecondary);

    List<CollectCommentSecondary> selectAll();
}
